home *** CD-ROM | disk | FTP | other *** search
- _LVOSupervisor = -$1E
- _LVOForbid = -$84
- _LVOCacheClearU = -$27C
- _LVOFreeMem = -$D2
- _LVOPermit = -$8A
- _LVOTypeOfMem = -$216
- _LVOAllocMem = -$C6
- _LVOCopyMem = -$270
-
- AbsExecBase = $4
- AttnFlags = $128
- MEMF_PUBLIC = $1
- MEMF_FAST = $4
-
- section vbr_chip,code
-
- Test: moveq #1,d7 * relocate VBR to CHIP..
- * moveq #0,d7 * Get addr of VBR.. no reloc
- * moveq #-1,d7 * relocate VBR to FAST..
-
- ModifyVBR: move.l (AbsExecBase).w,a6
- jsr _LVOForbid(a6)
- moveq #0,d5
- move.b AttnFlags+1(a6),d0 * which processor is installed?
- moveq #3,d1
- .nextbit: lsr.b #1,d0
- bcc.s .not_060
- add.w #10,d5
- dbf d1,.nextbit
- tst.b AttnFlags+1(a6) * 68060?
- bpl.s .not_060
- add.w #20,d5
- .not_060: tst.b d5
- beq.s Skip
- lea SetVBR(pc),a5
- jsr _LVOSupervisor(a6)
- tst.b d7
- beq.b Skip
- bmi.b VBR_To_Fast
- move.l a2,d0
- tst.l d0
- beq.b Skip
- moveq #0,d0
- bra.b RelocateVBR
- VBR_To_Fast move.l a2,a1
- jsr _LVOTypeOfMem(a6)
- btst #2,d0
- bne.b Skip
- move.l #1024,d0
- moveq #(MEMF_PUBLIC+MEMF_FAST),d1
- jsr _LVOAllocMem(a6)
- tst.l d0
- beq.b Skip
- RelocateVBR move.l d0,a3
- move.l a2,a0
- move.l d0,a1
- move.l #1024,d0
- jsr _LVOCopyMem(a6)
- move.l a2,-(sp)
- move.l a3,a2
- lea GetVBR(pc),a5
- jsr _LVOSupervisor(a6)
- jsr _LVOCacheClearU(a6)
- move.l (sp)+,d0
- beq.b Skip
- move.l d0,a1
- move.l #1024,d0
- jsr _LVOFreeMem(a6)
- Skip jmp _LVOPermit(a6)
- SetVBR movec vbr,a2
- GetVBR movec a2,vbr
- rte
-